<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>系统行为</title>
    <link rel="stylesheet" href="<?=adminassets?>assets/pear/component/pear/css/pear.css" />
</head>

<body class="pear-container">


    <div class="layui-card layui-form" lay-filter="component-form-element" style="margin-top: 10px;">
        <div class="layui-card-header">计划任务/回调设置</div>
        <div class="layui-card-body layui-row layui-col-space10">
            <form onsubmit="return saveSetting(this)" method="post" role="form">
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">计划任务访问密钥</label>
                        <div class="layui-input-block">
                            <input type="text" name="cronkey" value="<?=$conf['cronkey']?>" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">微信回调ip 白名单</label>
                        <div class="layui-input-block">
                            <input type="text" name="wxip" value="<?=$conf['wxip']?>" placeholder="多个ip用|隔开" class="layui-input">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" class="pear-btn pear-btn-primary">更新数据</button>
                    </div>
                </div>


            </form>
            <blockquote class="layui-elem-quote">
            <h3>加快回调监控</h3>
            <p>检测所有二维码 风控 执行周期"1分钟"执行一次</p>
            <input type="text" value="<?=$httphost?>/cron1.php?act=fkjk&key=<?=$conf['cronkey']?>" disabled class="layui-input">
            <p style="color: #990033;">此计划任务需要在用户中心开启，才会生效</p>
            </blockquote>
            <blockquote class="layui-elem-quote">
            <p>清理所有未支付订单 （所有用户） 执行周期"1分钟"执行一次</p>
            <input type="text" value="<?=$httphost?>/cron1.php?act=qlwzf&key=<?=$conf['cronkey']?>" disabled class="layui-input">
            <p style="color: #990033;">此计划任务每次清理最大100条</p>
            </blockquote>
            <blockquote class="layui-elem-quote">
            <p>QQPC协议cookie自动更新 执行周期"1分钟"执行一次</p>
            <input type="text" value="<?=$httphost?>/cron1.php?act=qqpcgxck&key=<?=$conf['cronkey']?>" disabled class="layui-input">
            </blockquote>
            <blockquote class="layui-elem-quote">
            <p>会员过期提醒(需要在用户中心开启) 执行周期"1分钟"执行一次</p>
            <input type="text" value="<?=$httphost?>/cron1.php?act=user_vips&key=<?=$conf['cronkey']?>" disabled class="layui-input">
            </blockquote>
            <blockquote class="layui-elem-quote">
            <p>APP掉线检测(当任务时间没跟上之后 就会改变状态 也可以挂秒级看你们自己) 执行周期"1分钟"执行一次</p>
            <input type="text" value="<?=$httphost?>/cron1.php?act=appcron&key=<?=$conf['cronkey']?>" disabled class="layui-input">
            </blockquote>
             <blockquote class="layui-elem-quote">
             <p>订单刷新监控,设置1秒的宝塔"计划任务"监控步骤 计划任务->Shell脚本->执行周期改成"1分钟"执行一次->然后脚本内容就是以下</p>
             
  <textarea rows="11" disabled class="layui-textarea">PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=1 #设置1秒的监控速度订单状态
for (( i = 0; i < 60; i=(i+step) )); do
curl -sS --connect-timeout 10 -m 60 '<?=$httphost?>/Cron.php?act=sxorder&key=<?=$conf['cronkey']?>'
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★[$endDate] Successful"
sleep $step
done
exit 0
 </textarea>
        </blockquote>
            <blockquote class="layui-elem-quote">
            <p>微信云端监控,10s宝塔"计划任务"监控步骤 计划任务->Shell脚本->执行周期改成"1分钟"执行一次->然后脚本内容就是以下</p>
            <textarea rows="11" disabled class="layui-textarea">
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=1 #设置1秒的监控速度微信云端监控
for (( i = 0; i < 60; i=(i+step) )); do
curl -sS --connect-timeout 10 -m 60 '<?=$httphost?>/Cron.php?act=wxyun&key=<?=$conf['cronkey']?>'
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★[$endDate] Successful"
sleep $step
done
exit 0
        </textarea>
        </blockquote>
        <blockquote class="layui-elem-quote">
            <p>mapi辅助监控(用mapi可以挂一下 有效解决部分收款码不回调的问题 但是不保证完全能解决 然后不用的话 就别挂 了 影响服务器使用效率),1s宝塔"计划任务"监控步骤 计划任务->Shell脚本->执行周期改成"1分钟"执行一次->然后脚本内容就是以下</p>
            <textarea rows="11" disabled class="layui-textarea">
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=1 #设置1秒的监控速度
for (( i = 0; i < 60; i=(i+step) )); do
curl -sS --connect-timeout 10 -m 60 '<?=$httphost?>/Cron.php?act=Notify&key=<?=$conf['cronkey']?>'
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★[$endDate] Successful"
sleep $step
done
exit 0
        </textarea>
        </blockquote>
        <blockquote class="layui-elem-quote">
            <p>店员辅助监控(店员在线后会自动更新),15s宝塔"计划任务"监控步骤 计划任务->Shell脚本->执行周期改成"1分钟"执行一次->然后脚本内容就是以下</p>
            <textarea rows="11" disabled class="layui-textarea">
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=15 #设置15秒的监控速度
for (( i = 0; i < 60; i=(i+step) )); do
curl -sS --connect-timeout 10 -m 60 '<?=$httphost?>/Cron.php?act=wx_dytime&key=<?=$conf['cronkey']?>'
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★[$endDate] Successful"
sleep $step
done
exit 0
        </textarea>
        </blockquote>
        <blockquote class="layui-elem-quote">
        <p>以下网址可以设置5秒的监控速度,若不监控,支付宝、QQ钱包cookie得不到刷新容易掉线。</p>
<p>宝塔"计划任务"监控步骤 计划任务->Shell脚本->执行周期改成"1分钟"执行一次->然后脚本内容就是以下</p>
<textarea rows="11" disabled class="layui-textarea">
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
step=1 #设置1秒的监控速度
for (( i = 0; i < 60; i=(i+step) )); do
curl -sS --connect-timeout 10 -m 60 '<?=$httphost?>/Cron.php?act=aliqqyun&key=<?=$conf['cronkey']?>'
endDate=`date +"%Y-%m-%d %H:%M:%S"`
echo "★[$endDate] Successful"
sleep $step
done
exit 0
        </textarea>
        
         <img src="../Core/assets/img/cron_png.png" width = "90%"/>
        </blockquote>
        </div>
    </div>
</body>
<script src="<?=adminassets?>assets/pear/component/layui/layui.js"></script>
<script src="<?=adminassets?>assets/pear/component/pear/pear.js"></script>
<script src="<?=adminassets?>assets/js/core_js/set.js"></script>
<script type="text/javascript" src="../Core/assets/js/jquery.min.js"></script>
